﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wpf.Ui.Controls;
using Wpf.Ui;
using ClientAppraise.Controls;
using ClientInfrastructure.Dto;

namespace ClientAppraise.Services
{

    public interface IZxNavigationService
    {
        //
        // 摘要:
        //     Lets you navigate to the selected page based on it's type. Should be used with
        //     Wpf.Ui.IPageService.
        //
        // 参数:
        //   pageType:
        //     Type of the page.
        //
        // 返回结果:
        //     true if the operation succeeds. false otherwise.
        bool Navigate(Type pageType);

        //
        // 摘要:
        //     Lets you navigate to the selected page based on it's tag. Should be used with
        //     Wpf.Ui.IPageService.
        //
        // 参数:
        //   pageIdOrTargetTag:
        //     Id or tag of the page.
        //
        // 返回结果:
        //     true if the operation succeeds. false otherwise.
        bool Navigate(string pageIdOrTargetTag);

        //
        // 摘要:
        //     Synchronously adds an element to the navigation stack and navigates current navigation
        //     Frame to the
        //
        // 参数:
        //   pageType:
        //     Type of control to be synchronously added to the navigation stack
        //
        // 返回结果:
        //     true if the operation succeeds. false otherwise.
        bool NavigateWithHierarchy(Type pageType);
        bool NavigateWithHierarchy(Type pageType, PageParameterDto? parameterDto);

        //
        // 摘要:
        //     Provides direct access to the control responsible for navigation.
        //
        // 返回结果:
        //     Instance of the Wpf.Ui.Controls.INavigationView control.
        IZxNavigationView GetNavigationControl();

        //
        // 摘要:
        //     Lets you attach the control that represents the Wpf.Ui.Controls.INavigationView.
        //
        //
        // 参数:
        //   navigation:
        //     Instance of the Wpf.Ui.Controls.INavigationView.
        void SetNavigationControl(IZxNavigationView navigation);

        //
        // 摘要:
        //     Lets you attach the service that delivers page instances to Wpf.Ui.Controls.INavigationView.
        //
        //
        // 参数:
        //   pageService:
        //     Instance of the Wpf.Ui.IPageService.
        void SetPageService(IPageService pageService);

        //
        // 摘要:
        //     Navigates the NavigationView to the previous journal entry.
        //
        // 返回结果:
        //     true if the operation succeeds. false otherwise.
        bool GoBack();
    }
}
